<script type="text/javascript" src="http://api.map.baidu.com/api?v=1.5&ak=824a595f958e444b737a5bc6325ad44f"></script>
<div id="<{$widget.GUID}>" style="width:100%;height:100%;overflow: hidden;margin:0;"></div>
<script type="text/javascript">
var map = new BMap.Map("<{$widget.GUID}>");
<{if $data.map_x && $data.map_y}>
var poi = new BMap.Point(<{$data.map_x}>, $data.map_y);
map.centerAndZoom(poi, 14);
var content = '<div style="margin:0;line-height:20px;padding:2px;">' +
				'<img src="<{$pager.img}>/<{$data.thumb}>" alt="" style="float:right;zoom:1;overflow:hidden;width:100px;height:100px;margin-left:3px;"/>' +
				'地址：<{$data.address}><br/>电话：<{$data.phone}>' +
			  '</div>';
//创建检索信息窗口对象
var searchInfoWindow = null;
searchInfoWindow = new BMapLib.SearchInfoWindow(map, content, {
		title  : "<{$data.title}>",      //标题
		width  : 290,             //宽度
		height : 105,              //高度
		panel  : "panel",         //检索结果面板
		enableAutoPan : true,     //自动平移
		searchTypes   :[
			BMAPLIB_TAB_SEARCH,   //周边检索
			BMAPLIB_TAB_TO_HERE,  //到这里去
			BMAPLIB_TAB_FROM_HERE //从这里出发
		]
	});
var marker = new BMap.Marker(poi); //创建marker对象
marker.addEventListener("click", function(e){
	searchInfoWindow.open(marker);
})
map.addOverlay(marker); //在地图中添加marker
<{else}>
map.centerAndZoom(new BMap.Point(117.332856,31.898782), 10);
<{/if}>
</script>